package com.controller.manage;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.service.manage.DatabaseService;


@Controller
@RequestMapping("/jsp/manager")
public class DBController {
    @Resource(name = "databaseServiceImp")
    public DatabaseService databaseService;

    @ResponseBody
    @RequestMapping(value = "/dbexport")
    public int dbexport(HttpServletRequest request) {
	String path=request.getSession().getServletContext().getRealPath("");
	String newpath=path.replace("Sxrczskmanage","SxrczskFront");
	int i=databaseService.exportDB(newpath);
	return i;
    }
}
